package summer.util;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Label;
import java.awt.Panel;

import javax.swing.JFrame;

public class ChatWindow extends JFrame {

    private static final long serialVersionUID = 1L;


    public static void main(String[] args) throws Exception {
        new ChatWindow();
    }


    public ChatWindow() {

        Panel outter = new Panel();
        outter.setLayout(new FlowLayout(FlowLayout.RIGHT));
        outter.setBackground(Color.GRAY);
        this.add(outter, BorderLayout.CENTER);


        Panel inner = new Panel();
        inner.setBackground(Color.PINK);
        outter.add(inner);

        Label l = new Label("hello");
        l.setAlignment(Label.RIGHT);
        inner.add(l, BorderLayout.EAST);

        this.setTitle("聊天室");
        this.setSize(400, 600);
        this.setLocation(200, 200);
        this.setVisible(true);
        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

}